package com.guigu.guliorder.entity.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

import static com.guigu.gulicommon.constant.CheckParametersConstant.*;

/**
 * 批量新增订单项入参
 *
 * @author 陈俊杰
 * @version 1.0
 * @since 2024/8/16 22:18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class InsertOrderItemBatchDto {


    /**
     * 订单Id
     */
    @NotNull(message = ORDER_ID_CANNOT_BE_NULL)
    private Long orderId;

    /**
     * 订单号
     */
    @NotBlank(message = ORDER_SN_CANNOT_BE_NULL)
    private String orderSn;

    /**
     * 商品Id
     */
    @NotNull(message = SPU_ID_CANNOT_BE_NULL)
    private Long spuId;

    /**
     * 商品名称
     */
    @NotBlank(message = SPU_NAME_CANNOT_BE_NULL)
    private String spuName;

    /**
     * 商品图片
     */
    @NotBlank(message = SPU_PIC_CANNOT_BE_NULL)
    private String spuPic;

    /**
     * 品牌
     */
    @NotBlank(message = SPU_BRAND_CANNOT_BE_NULL)
    private String spuBrand;

    /**
     * 商品分类id
     */
    @NotNull(message = CATEGORY_ID_CANNOT_BE_NULL)
    private Long categoryId;

    /**
     * 单款商品编号
     */
    @NotNull(message = SKU_ID_CANNOT_BE_NULL)
    private Long skuId;

    /**
     * 单款商品名字
     */
    @NotBlank(message = SKU_NAME_CANNOT_BE_NULL)
    private String skuName;

    /**
     * 单款商品图片
     */
    @NotBlank(message = SKU_PIC_CANNOT_BE_NULL)
    private String skuPic;

    /**
     * 单款商品价格
     */
    @NotNull(message = SKU_PRICE_CANNOT_BE_NULL)
    private BigDecimal skuPrice;

    /**
     * 单款商品购买的数量
     */
    @NotNull(message = SKU_PURCHASE_COUNT_CANNOT_BE_NULL)
    private Integer skuQuantity;

    /**
     * 单款商品销售属性组合（JSON）
     */
    @NotBlank(message = SKU_ATTRS_VALS_CANNOT_BE_NULL)
    private String skuAttrsVals;

    /**
     * 商品促销分解金额
     */
    private BigDecimal promotionAmount;

    /**
     * 优惠券优惠分解金额
     */
    private BigDecimal couponAmount;

    /**
     * 积分优惠分解金额
     */
    private BigDecimal integrationAmount;

    /**
     * 该商品经过优惠后的分解金额
     */
    private BigDecimal realAmount;

    /**
     * 赠送积分
     */
    private Integer giftIntegration;

    /**
     * 赠送成长值
     */
    private Integer giftGrowth;


}
